package com.suncnpap.library.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.app.util.database.mybatis.Page;
import com.suncnpap.library.service.PublishHouseService;
import com.suncnpap.library.mapper.PublishHouseMapper;
import com.suncnpap.library.model.PublishHouse;

/** 
 * 说明： 出版社Service实现类
 * @version
 */
@Service("publishHouseService")
public class PublishHouseServiceImpl implements PublishHouseService{

	
	@Autowired
	PublishHouseMapper publishHouseMapper;
	
	@Override
	public void add(PublishHouse obj) {
		// TODO Auto-generated method stub
		publishHouseMapper.add(obj);
	}

	@Override
	public void update(PublishHouse obj) {
		// TODO Auto-generated method stub
		publishHouseMapper.edit(obj);
	}

	@Override
	public void deleteById(String strId) {
		// TODO Auto-generated method stub
		publishHouseMapper.deleteById(strId);
		
	}
	@Override
	public void deleteMore(String[] strIds) {
		// TODO Auto-generated method stub
		publishHouseMapper.deleteMore(strIds);
	}

	@Override
	public Page list(Page page) {
		// TODO Auto-generated method stub
		List<PublishHouse> list = publishHouseMapper.datalistPage(page);
		page.setDataList(list);
		return page;
	}


	@Override
	public int findCount(Page page) {
		// TODO Auto-generated method stub
		return publishHouseMapper.findCount(page);
	}

	@Override
	public List<PublishHouse> press() {
		List<PublishHouse> publishHouse=publishHouseMapper.getPress();
		return publishHouse;
	}

	@Override
	public PublishHouse findById(String strId) {
		// TODO Auto-generated method stub
		return publishHouseMapper.findById(strId);
	}
	
}

